.class public Lrexsee/open/RexseeRenRenSNS;
.super Ljava/lang/Object;
.source "RexseeRenRenSNS.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;
.implements Lrexsee/open/OpenInterface;


# static fields
.field public static final EVENT_RENRENWEIBOREADY:Ljava/lang/String; = "onRenRenSNSReady"

.field public static final INTERFACE_NAME:Ljava/lang/String; = "RenRenSNS"

.field private static final LINK_REXSEEAPP:Ljava/lang/String; = "http://www.rexsee.com/CN/app/index.html"

.field private static final STRING_ADD:Ljava/lang/String; = "\u6b63\u5728\u53d1\u9001\u65b0\u9c9c\u4e8b......"

.field private static final STRING_ADD_MESSAGE:Ljava/lang/String; = "\u563f\u563f\uff0c\u6211\u6b63\u5728\u6d4f\u89c8\u7528Rexsee\u5f00\u53d1\u5e73\u53f0\uff08http://www.rexsee.com\uff09\u521b\u5efa\u7684Android\u5e94\u7528{appName}\u3002"

.field private static final STRING_ADD_OK:Ljava/lang/String; = "\u5206\u4eab\u6210\u529f\u3002"

.field private static final STRING_LIKE:Ljava/lang/String; = "\u6b63\u5728\u53d1\u9001\u559c\u6b22......"

.field private static final STRING_NAME:Ljava/lang/String; = "\u4eba\u4eba\u7f51"

.field private static final URL_API:Ljava/lang/String; = "http://api.renren.com/restserver.do"

.field private static final URL_VERIFY:Ljava/lang/String; = "http://graph.renren.com/oauth/grant?client_id={consumerKey}&redirect_uri=http%3A%2F%2Fgraph.renren.com%2Foauth%2Flogin_success.html&response_type=token&display=popup"

.field private static final URL_VERIFY_SUCCESS:Ljava/lang/String; = "http://graph.renren.com/oauth/login_success.html"


# instance fields
.field private mAccessToken:Ljava/lang/String;

.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private final mContext:Landroid/content/Context;

.field private mDefaultLink:Ljava/lang/String;

.field private mDefaultTitle:Ljava/lang/String;

.field private mKey:Ljava/lang/String;

.field private final mPermissions:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field private mSecret:Ljava/lang/String;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 7
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    const/4 v5, 0x0

    const-string v6, "string"

    .line 82
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 84
    iput-object p1, p0, Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;

    .line 85
    iget-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {v3}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v3

    iput-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mContext:Landroid/content/Context;

    .line 86
    iget-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v3, v3, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v4, "onRenRenSNSReady"

    invoke-virtual {v3, v4}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 87
    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    iput-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mPermissions:Ljava/util/ArrayList;

    .line 88
    iget-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mPermissions:Ljava/util/ArrayList;

    const-string v4, "publish_feed"

    invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 89
    iget-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mPermissions:Ljava/util/ArrayList;

    const-string v4, "publish_share"

    invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 90
    iget-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mPermissions:Ljava/util/ArrayList;

    const-string v4, "operate_like"

    invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 92
    iget-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v3, v3, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    invoke-virtual {v3}, Lrexsee/core/application/RexseeApplication;->getLabel()Ljava/lang/String;

    move-result-object v3

    iput-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mDefaultTitle:Ljava/lang/String;

    .line 93
    const-string v3, "http://www.rexsee.com/CN/app/index.html"

    iput-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mDefaultLink:Ljava/lang/String;

    .line 95
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    .line 96
    .local v2, "r":Landroid/content/res/Resources;
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v1

    .line 97
    .local v1, "packageName":Ljava/lang/String;
    const-string v3, "RenRenSNSKey"

    const-string v4, "string"

    invoke-virtual {v2, v3, v6, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 98
    .local v0, "id":I
    if-nez v0, :cond_0

    move-object v3, v5

    :goto_0
    iput-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mKey:Ljava/lang/String;

    .line 99
    const-string v3, "RenRenSNSSecret"

    const-string v4, "string"

    invoke-virtual {v2, v3, v6, v1}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v0

    .line 100
    if-nez v0, :cond_1

    move-object v3, v5

    :goto_1
    iput-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mSecret:Ljava/lang/String;

    .line 102
    iput-object v5, p0, Lrexsee/open/RexseeRenRenSNS;->mAccessToken:Ljava/lang/String;

    .line 104
    return-void

    .line 98
    :cond_0
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    goto :goto_0

    .line 100
    :cond_1
    invoke-virtual {v2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    goto :goto_1
.end method

.method private _getSignature(Ljava/util/Map;)Ljava/lang/String;
    .locals 14
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;)",
            "Ljava/lang/String;"
        }
    .end annotation

    .prologue
    .local p1, "paramMap":Ljava/util/Map;, "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;"
    const/4 v13, 0x0

    .line 167
    new-instance v7, Ljava/util/ArrayList;

    invoke-interface {p1}, Ljava/util/Map;->size()I

    move-result v9

    invoke-direct {v7, v9}, Ljava/util/ArrayList;-><init>(I)V

    .line 168
    .local v7, "paramList":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
    invoke-interface {p1}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v9

    invoke-interface {v9}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v10

    :goto_0
    invoke-interface {v10}, Ljava/util/Iterator;->hasNext()Z

    move-result v9

    if-nez v9, :cond_1

    .line 171
    invoke-static {v7}, Ljava/util/Collections;->sort(Ljava/util/List;)V

    .line 172
    new-instance v1, Ljava/lang/StringBuffer;

    invoke-direct {v1}, Ljava/lang/StringBuffer;-><init>()V

    .line 173
    .local v1, "buffer":Ljava/lang/StringBuffer;
    invoke-interface {v7}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v9

    :goto_1
    invoke-interface {v9}, Ljava/util/Iterator;->hasNext()Z

    move-result v10

    if-nez v10, :cond_2

    .line 176
    iget-object v9, p0, Lrexsee/open/RexseeRenRenSNS;->mSecret:Ljava/lang/String;

    invoke-virtual {v1, v9}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 178
    :try_start_0
    const-string v9, "MD5"

    invoke-static {v9}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;

    move-result-object v4

    .line 179
    .local v4, "md":Ljava/security/MessageDigest;
    new-instance v8, Ljava/lang/StringBuffer;

    invoke-direct {v8}, Ljava/lang/StringBuffer;-><init>()V
    :try_end_0
    .catch Ljava/security/NoSuchAlgorithmException; {:try_start_0 .. :try_end_0} :catch_1

    .line 181
    .local v8, "result":Ljava/lang/StringBuffer;
    :try_start_1
    invoke-virtual {v1}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v9

    const-string v10, "UTF-8"

    invoke-virtual {v9, v10}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B

    move-result-object v9

    invoke-virtual {v4, v9}, Ljava/security/MessageDigest;->digest([B)[B

    move-result-object v9

    array-length v10, v9
    :try_end_1
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_1 .. :try_end_1} :catch_0
    .catch Ljava/security/NoSuchAlgorithmException; {:try_start_1 .. :try_end_1} :catch_1

    move v11, v13

    :goto_2
    if-lt v11, v10, :cond_3

    .line 191
    :cond_0
    :try_start_2
    invoke-virtual {v8}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;
    :try_end_2
    .catch Ljava/security/NoSuchAlgorithmException; {:try_start_2 .. :try_end_2} :catch_1

    move-result-object v9

    .line 195
    .end local v4    # "md":Ljava/security/MessageDigest;
    .end local v8    # "result":Ljava/lang/StringBuffer;
    :goto_3
    return-object v9

    .line 168
    .end local v1    # "buffer":Ljava/lang/StringBuffer;
    :cond_1
    invoke-interface {v10}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Ljava/util/Map$Entry;

    .line 169
    .local v6, "param":Ljava/util/Map$Entry;, "Ljava/util/Map$Entry<Ljava/lang/String;Ljava/lang/String;>;"
    new-instance v11, Ljava/lang/StringBuilder;

    invoke-interface {v6}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Ljava/lang/String;

    invoke-static {v9}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v11, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v9, "="

    invoke-virtual {v11, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-interface {v6}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Ljava/lang/String;

    invoke-virtual {v11, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v9

    invoke-interface {v7, v9}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 173
    .end local v6    # "param":Ljava/util/Map$Entry;, "Ljava/util/Map$Entry<Ljava/lang/String;Ljava/lang/String;>;"
    .restart local v1    # "buffer":Ljava/lang/StringBuffer;
    :cond_2
    invoke-interface {v9}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/String;

    .line 174
    .local v5, "param":Ljava/lang/String;
    invoke-virtual {v1, v5}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    goto :goto_1

    .line 181
    .end local v5    # "param":Ljava/lang/String;
    .restart local v4    # "md":Ljava/security/MessageDigest;
    .restart local v8    # "result":Ljava/lang/StringBuffer;
    :cond_3
    :try_start_3
    aget-byte v0, v9, v11

    .line 182
    .local v0, "b":B
    and-int/lit16 v12, v0, 0xf0

    ushr-int/lit8 v12, v12, 0x4

    invoke-static {v12}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v8, v12}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 183
    and-int/lit8 v12, v0, 0xf

    invoke-static {v12}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v8, v12}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
    :try_end_3
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_3 .. :try_end_3} :catch_0
    .catch Ljava/security/NoSuchAlgorithmException; {:try_start_3 .. :try_end_3} :catch_1

    .line 181
    add-int/lit8 v11, v11, 0x1

    goto :goto_2

    .line 185
    .end local v0    # "b":B
    :catch_0
    move-exception v9

    move-object v2, v9

    .line 186
    .local v2, "e":Ljava/io/UnsupportedEncodingException;
    :try_start_4
    invoke-virtual {v1}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/String;->getBytes()[B

    move-result-object v9

    invoke-virtual {v4, v9}, Ljava/security/MessageDigest;->digest([B)[B

    move-result-object v9

    array-length v10, v9

    move v11, v13

    :goto_4
    if-ge v11, v10, :cond_0

    aget-byte v0, v9, v11

    .line 187
    .restart local v0    # "b":B
    and-int/lit16 v12, v0, 0xf0

    ushr-int/lit8 v12, v12, 0x4

    invoke-static {v12}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v8, v12}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    .line 188
    and-int/lit8 v12, v0, 0xf

    invoke-static {v12}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;

    move-result-object v12

    invoke-virtual {v8, v12}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
    :try_end_4
    .catch Ljava/security/NoSuchAlgorithmException; {:try_start_4 .. :try_end_4} :catch_1

    .line 186
    add-int/lit8 v11, v11, 0x1

    goto :goto_4

    .line 192
    .end local v0    # "b":B
    .end local v2    # "e":Ljava/io/UnsupportedEncodingException;
    .end local v4    # "md":Ljava/security/MessageDigest;
    .end local v8    # "result":Ljava/lang/StringBuffer;
    :catch_1
    move-exception v9

    move-object v3, v9

    .line 193
    .local v3, "ex":Ljava/security/NoSuchAlgorithmException;
    invoke-virtual {v3}, Ljava/security/NoSuchAlgorithmException;->printStackTrace()V

    .line 195
    const/4 v9, 0x0

    goto/16 :goto_3
.end method

.method private _parseToken(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z
    .locals 7
    .param p1, "url"    # Ljava/lang/String;
    .param p2, "arguments"    # Ljava/lang/String;
    .param p3, "progressTitle"    # Ljava/lang/String;
    .param p4, "successMessage"    # Ljava/lang/String;

    .prologue
    const/4 v5, 0x1

    const/4 v6, 0x0

    .line 198
    iget-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mAccessToken:Ljava/lang/String;

    if-eqz v3, :cond_0

    move v3, v5

    .line 223
    :goto_0
    return v3

    .line 199
    :cond_0
    if-eqz p1, :cond_2

    const-string v3, "http://graph.renren.com/oauth/login_success.html"

    invoke-virtual {p1, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_2

    .line 200
    const-string v2, "access_token="

    .line 201
    .local v2, "start":Ljava/lang/String;
    const-string v1, "&expires_in="

    .line 203
    .local v1, "end":Ljava/lang/String;
    :try_start_0
    invoke-virtual {p1, v2}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v3

    const/4 v4, 0x1

    aget-object v3, v3, v4

    invoke-virtual {v3, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v3

    const/4 v4, 0x0

    aget-object v3, v3, v4

    invoke-static {v3}, Ljava/net/URLDecoder;->decode(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    iput-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mAccessToken:Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 208
    iget-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v3, v3, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v4, "onRenRenSNSReady"

    invoke-virtual {v3, v4}, Lrexsee/core/browser/clazz/EventList;->run(Ljava/lang/String;)V

    .line 209
    if-eqz p2, :cond_1

    .line 210
    new-instance v3, Lrexsee/open/RexseeRenRenSNS$2;

    invoke-direct {v3, p0, p2, p3, p4}, Lrexsee/open/RexseeRenRenSNS$2;-><init>(Lrexsee/open/RexseeRenRenSNS;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 220
    invoke-virtual {v3}, Lrexsee/open/RexseeRenRenSNS$2;->start()V

    :cond_1
    move v3, v5

    .line 222
    goto :goto_0

    .line 204
    :catch_0
    move-exception v3

    move-object v0, v3

    .line 205
    .local v0, "e":Ljava/lang/Exception;
    iget-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Lrexsee/open/RexseeRenRenSNS;->getInterfaceName()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v5, ".parseToken"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4, p1}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    move v3, v6

    .line 206
    goto :goto_0

    .end local v0    # "e":Ljava/lang/Exception;
    .end local v1    # "end":Ljava/lang/String;
    .end local v2    # "start":Ljava/lang/String;
    :cond_2
    move v3, v6

    .line 223
    goto :goto_0
.end method

.method private _post(Ljava/util/Map;)Ljava/lang/String;
    .locals 19
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            ">;)",
            "Ljava/lang/String;"
        }
    .end annotation

    .prologue
    .line 126
    .local p1, "paramMap":Ljava/util/Map;, "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;"
    const-string v15, "call_id"

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v16

    invoke-static/range {v16 .. v17}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v16

    invoke-static/range {v16 .. v16}, Ljava/net/URLEncoder;->encode(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v16

    move-object/from16 v0, p1

    move-object v1, v15

    move-object/from16 v2, v16

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 127
    const-string v15, "v"

    const-string v16, "1.0"

    move-object/from16 v0, p1

    move-object v1, v15

    move-object/from16 v2, v16

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 128
    const-string v15, "access_token"

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/open/RexseeRenRenSNS;->mAccessToken:Ljava/lang/String;

    move-object/from16 v16, v0

    move-object/from16 v0, p1

    move-object v1, v15

    move-object/from16 v2, v16

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 129
    const-string v15, "format"

    const-string v16, "JSON"

    move-object/from16 v0, p1

    move-object v1, v15

    move-object/from16 v2, v16

    invoke-interface {v0, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 131
    invoke-direct/range {p0 .. p1}, Lrexsee/open/RexseeRenRenSNS;->_getSignature(Ljava/util/Map;)Ljava/lang/String;

    move-result-object v14

    .line 133
    .local v14, "signature":Ljava/lang/String;
    const-string v4, ""

    .line 134
    .local v4, "fields":Ljava/lang/String;
    invoke-interface/range {p1 .. p1}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v15

    invoke-interface {v15}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v15

    :goto_0
    invoke-interface {v15}, Ljava/util/Iterator;->hasNext()Z

    move-result v16

    if-nez v16, :cond_0

    .line 139
    new-instance v10, Ljava/util/ArrayList;

    invoke-direct {v10}, Ljava/util/ArrayList;-><init>()V

    .line 140
    .local v10, "params":Ljava/util/List;, "Ljava/util/List<Lorg/apache/http/NameValuePair;>;"
    invoke-interface/range {p1 .. p1}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v15

    invoke-interface {v15}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v7

    .line 141
    .local v7, "iterator":Ljava/util/Iterator;, "Ljava/util/Iterator<Ljava/lang/String;>;"
    :goto_1
    invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z

    move-result v15

    if-nez v15, :cond_2

    .line 145
    new-instance v15, Lorg/apache/http/message/BasicNameValuePair;

    const-string v16, "sig"

    move-object v0, v15

    move-object/from16 v1, v16

    move-object v2, v14

    invoke-direct {v0, v1, v2}, Lorg/apache/http/message/BasicNameValuePair;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-interface {v10, v15}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 148
    :try_start_0
    new-instance v6, Lorg/apache/http/client/entity/UrlEncodedFormEntity;

    const-string v15, "UTF-8"

    invoke-direct {v6, v10, v15}, Lorg/apache/http/client/entity/UrlEncodedFormEntity;-><init>(Ljava/util/List;Ljava/lang/String;)V

    .line 149
    .local v6, "httpEntity":Lorg/apache/http/HttpEntity;
    new-instance v11, Lorg/apache/http/client/methods/HttpPost;

    const-string v15, "http://api.renren.com/restserver.do"

    invoke-direct {v11, v15}, Lorg/apache/http/client/methods/HttpPost;-><init>(Ljava/lang/String;)V

    .line 150
    .local v11, "post":Lorg/apache/http/client/methods/HttpPost;
    invoke-virtual {v11, v6}, Lorg/apache/http/client/methods/HttpPost;->setEntity(Lorg/apache/http/HttpEntity;)V

    .line 151
    new-instance v5, Lorg/apache/http/impl/client/DefaultHttpClient;

    invoke-direct {v5}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>()V

    .line 152
    .local v5, "httpClient":Lorg/apache/http/impl/client/DefaultHttpClient;
    invoke-virtual {v5, v11}, Lorg/apache/http/impl/client/DefaultHttpClient;->execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;

    move-result-object v12

    .line 153
    .local v12, "response":Lorg/apache/http/HttpResponse;
    invoke-interface {v12}, Lorg/apache/http/HttpResponse;->getEntity()Lorg/apache/http/HttpEntity;

    move-result-object v15

    invoke-static {v15}, Lorg/apache/http/util/EntityUtils;->toString(Lorg/apache/http/HttpEntity;)Ljava/lang/String;

    move-result-object v13

    .line 154
    .local v13, "result":Ljava/lang/String;
    invoke-interface {v12}, Lorg/apache/http/HttpResponse;->getStatusLine()Lorg/apache/http/StatusLine;

    move-result-object v15

    invoke-interface {v15}, Lorg/apache/http/StatusLine;->getStatusCode()I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v15

    const/16 v16, 0xc8

    move v0, v15

    move/from16 v1, v16

    if-ne v0, v1, :cond_3

    move-object v15, v13

    .line 162
    .end local v5    # "httpClient":Lorg/apache/http/impl/client/DefaultHttpClient;
    .end local v6    # "httpEntity":Lorg/apache/http/HttpEntity;
    .end local v11    # "post":Lorg/apache/http/client/methods/HttpPost;
    .end local v12    # "response":Lorg/apache/http/HttpResponse;
    .end local v13    # "result":Ljava/lang/String;
    .end local p0    # "this":Lrexsee/open/RexseeRenRenSNS;
    :goto_2
    return-object v15

    .line 134
    .end local v7    # "iterator":Ljava/util/Iterator;, "Ljava/util/Iterator<Ljava/lang/String;>;"
    .end local v10    # "params":Ljava/util/List;, "Ljava/util/List<Lorg/apache/http/NameValuePair;>;"
    .restart local p0    # "this":Lrexsee/open/RexseeRenRenSNS;
    :cond_0
    invoke-interface {v15}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v9

    check-cast v9, Ljava/util/Map$Entry;

    .line 135
    .local v9, "param":Ljava/util/Map$Entry;, "Ljava/util/Map$Entry<Ljava/lang/String;Ljava/lang/String;>;"
    const-string v16, ""

    move-object v0, v4

    move-object/from16 v1, v16

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v16

    if-nez v16, :cond_1

    new-instance v16, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v17

    invoke-direct/range {v16 .. v17}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v17, ","

    invoke-virtual/range {v16 .. v17}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v16

    invoke-virtual/range {v16 .. v16}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 136
    :cond_1
    new-instance v16, Ljava/lang/StringBuilder;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v17

    invoke-direct/range {v16 .. v17}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-interface {v9}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    move-object/from16 v0, v16

    move-object v1, v3

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v16

    invoke-virtual/range {v16 .. v16}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    goto/16 :goto_0

    .line 142
    .end local v9    # "param":Ljava/util/Map$Entry;, "Ljava/util/Map$Entry<Ljava/lang/String;Ljava/lang/String;>;"
    .restart local v7    # "iterator":Ljava/util/Iterator;, "Ljava/util/Iterator<Ljava/lang/String;>;"
    .restart local v10    # "params":Ljava/util/List;, "Ljava/util/List<Lorg/apache/http/NameValuePair;>;"
    :cond_2
    invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Ljava/lang/String;

    .line 143
    .local v8, "key":Ljava/lang/String;
    new-instance v15, Lorg/apache/http/message/BasicNameValuePair;

    move-object/from16 v0, p1

    move-object v1, v8

    invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    invoke-direct {v15, v8, v3}, Lorg/apache/http/message/BasicNameValuePair;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-interface {v10, v15}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto/16 :goto_1

    .line 157
    .end local v8    # "key":Ljava/lang/String;
    .restart local v5    # "httpClient":Lorg/apache/http/impl/client/DefaultHttpClient;
    .restart local v6    # "httpEntity":Lorg/apache/http/HttpEntity;
    .restart local v11    # "post":Lorg/apache/http/client/methods/HttpPost;
    .restart local v12    # "response":Lorg/apache/http/HttpResponse;
    .restart local v13    # "result":Ljava/lang/String;
    :cond_3
    :try_start_1
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;

    move-object v15, v0

    invoke-virtual/range {p0 .. p0}, Lrexsee/open/RexseeRenRenSNS;->getInterfaceName()Ljava/lang/String;

    move-result-object v16

    new-instance v17, Ljava/lang/StringBuilder;

    invoke-static {v13}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v18

    invoke-direct/range {v17 .. v18}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v18, "["

    invoke-virtual/range {v17 .. v18}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v17

    const-string v18, "method"

    move-object/from16 v0, p1

    move-object/from16 v1, v18

    invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    move-object/from16 v0, v17

    move-object v1, v3

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v17

    const-string v18, "]"

    invoke-virtual/range {v17 .. v18}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v17

    invoke-virtual/range {v15 .. v17}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    .line 158
    const-string v15, ""

    goto/16 :goto_2

    .line 160
    .end local v5    # "httpClient":Lorg/apache/http/impl/client/DefaultHttpClient;
    .end local v6    # "httpEntity":Lorg/apache/http/HttpEntity;
    .end local v11    # "post":Lorg/apache/http/client/methods/HttpPost;
    .end local v12    # "response":Lorg/apache/http/HttpResponse;
    .end local v13    # "result":Ljava/lang/String;
    :catch_0
    move-exception v15

    move-object v3, v15

    .line 161
    .local v3, "e":Ljava/lang/Exception;
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;

    move-object v15, v0

    invoke-virtual/range {p0 .. p0}, Lrexsee/open/RexseeRenRenSNS;->getInterfaceName()Ljava/lang/String;

    move-result-object v16

    new-instance v17, Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/Exception;->getLocalizedMessage()Ljava/lang/String;

    move-result-object v18

    invoke-static/range {v18 .. v18}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v18

    invoke-direct/range {v17 .. v18}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v18, "["

    invoke-virtual/range {v17 .. v18}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v17

    const-string v18, "method"

    move-object/from16 v0, p1

    move-object/from16 v1, v18

    invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p0

    .end local p0    # "this":Lrexsee/open/RexseeRenRenSNS;
    check-cast p0, Ljava/lang/String;

    move-object/from16 v0, v17

    move-object/from16 v1, p0

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v17

    const-string v18, "]"

    invoke-virtual/range {v17 .. v18}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v17

    invoke-virtual/range {v17 .. v17}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v17

    invoke-virtual/range {v15 .. v17}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 162
    const-string v15, ""

    goto/16 :goto_2
.end method

.method static synthetic access$0(Lrexsee/open/RexseeRenRenSNS;)Lrexsee/core/browser/Browser;
    .locals 1

    .prologue
    .line 70
    iget-object v0, p0, Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;

    return-object v0
.end method

.method static synthetic access$1(Lrexsee/open/RexseeRenRenSNS;)Ljava/lang/String;
    .locals 1

    .prologue
    .line 68
    iget-object v0, p0, Lrexsee/open/RexseeRenRenSNS;->mKey:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$2(Lrexsee/open/RexseeRenRenSNS;)Ljava/util/ArrayList;
    .locals 1

    .prologue
    .line 77
    iget-object v0, p0, Lrexsee/open/RexseeRenRenSNS;->mPermissions:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$3(Lrexsee/open/RexseeRenRenSNS;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z
    .locals 1

    .prologue
    .line 197
    invoke-direct {p0, p1, p2, p3, p4}, Lrexsee/open/RexseeRenRenSNS;->_parseToken(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z

    move-result v0

    return v0
.end method

.method public static getPopMenuItem(Lrexsee/core/browser/Browser;)Lrexsee/core/menu/PopMenuItem;
    .locals 5
    .param p0, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 108
    invoke-virtual {p0}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v1

    const-string v2, "RenRenSNSEnabled"

    const/4 v3, 0x1

    invoke-static {v1, v2, v3}, Lrexsee/core/application/Resource;->isEnabled(Landroid/content/Context;Ljava/lang/String;Z)Z

    move-result v1

    if-nez v1, :cond_0

    const/4 v1, 0x0

    .line 121
    :goto_0
    return-object v1

    .line 110
    :cond_0
    new-instance v0, Lrexsee/core/menu/PopMenuItem;

    invoke-virtual {p0}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v1

    const-string v2, "\u4eba\u4eba\u7f51"

    new-instance v3, Lrexsee/open/RexseeRenRenSNS$1;

    invoke-direct {v3, p0}, Lrexsee/open/RexseeRenRenSNS$1;-><init>(Lrexsee/core/browser/Browser;)V

    .line 120
    const-string v4, "label:\u4eba\u4eba\u7f51;"

    .line 110
    invoke-direct {v0, v1, v2, v3, v4}, Lrexsee/core/menu/PopMenuItem;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Runnable;Ljava/lang/String;)V

    .local v0, "item":Lrexsee/core/menu/PopMenuItem;
    move-object v1, v0

    .line 121
    goto :goto_0
.end method


# virtual methods
.method public add(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .param p1, "title"    # Ljava/lang/String;
    .param p2, "link"    # Ljava/lang/String;
    .param p3, "message"    # Ljava/lang/String;

    .prologue
    .line 394
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "method:feed.publishFeed;name:"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ";description:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ";url:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ";"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 395
    .local v0, "argu":Ljava/lang/String;
    const-string v1, "\u6b63\u5728\u53d1\u9001\u65b0\u9c9c\u4e8b......"

    invoke-virtual {p0, v0, v1}, Lrexsee/open/RexseeRenRenSNS;->request(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method public addPermision(Ljava/lang/String;)V
    .locals 1
    .param p1, "permission"    # Ljava/lang/String;

    .prologue
    .line 316
    iget-object v0, p0, Lrexsee/open/RexseeRenRenSNS;->mPermissions:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 317
    return-void
.end method

.method public cleatPermissions()V
    .locals 1

    .prologue
    .line 319
    iget-object v0, p0, Lrexsee/open/RexseeRenRenSNS;->mPermissions:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V

    .line 320
    return-void
.end method

.method public getDefaultTitleAndLink()Ljava/lang/String;
    .locals 2

    .prologue
    .line 329
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "{\"title\":\""

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Lrexsee/open/RexseeRenRenSNS;->mDefaultTitle:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\",\"link\":\""

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lrexsee/open/RexseeRenRenSNS;->mDefaultLink:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\"}"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 0
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 55
    return-object p0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 51
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "RenRenSNS"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getKeyAndSecret()Ljava/lang/String;
    .locals 2

    .prologue
    .line 236
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "{\"key\":\""

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Lrexsee/open/RexseeRenRenSNS;->mKey:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\",\"secret\":\""

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lrexsee/open/RexseeRenRenSNS;->mSecret:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\",\"token\":\""

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lrexsee/open/RexseeRenRenSNS;->mAccessToken:Ljava/lang/String;

    if-nez v1, :cond_0

    const-string v1, ""

    :goto_0
    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\"}"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0

    :cond_0
    iget-object v1, p0, Lrexsee/open/RexseeRenRenSNS;->mAccessToken:Ljava/lang/String;

    goto :goto_0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 59
    new-instance v0, Lrexsee/open/RexseeRenRenSNS;

    invoke-direct {v0, p1}, Lrexsee/open/RexseeRenRenSNS;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getPermissions()Ljava/lang/String;
    .locals 1

    .prologue
    .line 322
    iget-object v0, p0, Lrexsee/open/RexseeRenRenSNS;->mPermissions:Ljava/util/ArrayList;

    invoke-static {v0}, Lrexsee/core/utilities/Json;->toJson(Ljava/util/List;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public isReady()Z
    .locals 1

    .prologue
    .line 250
    iget-object v0, p0, Lrexsee/open/RexseeRenRenSNS;->mAccessToken:Ljava/lang/String;

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public like(Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .param p1, "url"    # Ljava/lang/String;

    .prologue
    .line 398
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "method:like.like;url:"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ";"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 399
    .local v0, "argu":Ljava/lang/String;
    const-string v1, "\u6b63\u5728\u53d1\u9001\u559c\u6b22......"

    invoke-virtual {p0, v0, v1}, Lrexsee/open/RexseeRenRenSNS;->request(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method public login()V
    .locals 1

    .prologue
    const/4 v0, 0x0

    .line 240
    invoke-virtual {p0, v0, v0, v0}, Lrexsee/open/RexseeRenRenSNS;->loginAndRequest(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 241
    return-void
.end method

.method public loginAndRequest(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 2
    .param p1, "arguments"    # Ljava/lang/String;
    .param p2, "progressTitle"    # Ljava/lang/String;
    .param p3, "successMessage"    # Ljava/lang/String;

    .prologue
    .line 254
    invoke-virtual {p0}, Lrexsee/open/RexseeRenRenSNS;->logout()V

    .line 255
    iget-object v0, p0, Lrexsee/open/RexseeRenRenSNS;->mContext:Landroid/content/Context;

    check-cast v0, Landroid/app/Activity;

    new-instance v1, Lrexsee/open/RexseeRenRenSNS$3;

    invoke-direct {v1, p0, p1, p2, p3}, Lrexsee/open/RexseeRenRenSNS$3;-><init>(Lrexsee/open/RexseeRenRenSNS;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    .line 305
    return-void
.end method

.method public logout()V
    .locals 2

    .prologue
    .line 244
    invoke-static {}, Landroid/webkit/CookieManager;->getInstance()Landroid/webkit/CookieManager;

    move-result-object v0

    .line 245
    .local v0, "cookieManager":Landroid/webkit/CookieManager;
    invoke-virtual {v0}, Landroid/webkit/CookieManager;->removeAllCookie()V

    .line 246
    const/4 v1, 0x0

    iput-object v1, p0, Lrexsee/open/RexseeRenRenSNS;->mAccessToken:Ljava/lang/String;

    .line 247
    return-void
.end method

.method public promptAndAdd()V
    .locals 4

    .prologue
    .line 334
    const-string v1, "\u563f\u563f\uff0c\u6211\u6b63\u5728\u6d4f\u89c8\u7528Rexsee\u5f00\u53d1\u5e73\u53f0\uff08http://www.rexsee.com\uff09\u521b\u5efa\u7684Android\u5e94\u7528{appName}\u3002"

    const-string v2, "{appName}"

    iget-object v3, p0, Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v3, v3, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    invoke-virtual {v3}, Lrexsee/core/application/RexseeApplication;->getLabel()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v0

    .line 335
    .local v0, "defaultMessage":Ljava/lang/String;
    iget-object v1, p0, Lrexsee/open/RexseeRenRenSNS;->mDefaultTitle:Ljava/lang/String;

    iget-object v2, p0, Lrexsee/open/RexseeRenRenSNS;->mDefaultLink:Ljava/lang/String;

    invoke-virtual {p0, v1, v2, v0}, Lrexsee/open/RexseeRenRenSNS;->promptAndAdd(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 336
    return-void
.end method

.method public promptAndAdd(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 9
    .param p1, "title"    # Ljava/lang/String;
    .param p2, "link"    # Ljava/lang/String;
    .param p3, "message"    # Ljava/lang/String;

    .prologue
    const/4 v8, 0x0

    const/4 v7, -0x1

    const/16 v6, 0xf

    .line 338
    new-instance v4, Landroid/app/AlertDialog$Builder;

    iget-object v5, p0, Lrexsee/open/RexseeRenRenSNS;->mContext:Landroid/content/Context;

    invoke-direct {v4, v5}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    invoke-virtual {v4}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v0

    .line 339
    .local v0, "dialog":Landroid/app/AlertDialog;
    iget-object v4, p0, Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v4, v4, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v4, v4, Lrexsee/core/application/RexseeApplication;->icon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v0, v4}, Landroid/app/AlertDialog;->setIcon(Landroid/graphics/drawable/Drawable;)V

    .line 340
    const-string v4, "\u4eba\u4eba\u7f51"

    invoke-virtual {v0, v4}, Landroid/app/AlertDialog;->setTitle(Ljava/lang/CharSequence;)V

    .line 341
    invoke-virtual {v0, v8}, Landroid/app/AlertDialog;->setCancelable(Z)V

    .line 342
    new-instance v4, Lrexsee/open/RexseeRenRenSNS$4;

    invoke-direct {v4, p0}, Lrexsee/open/RexseeRenRenSNS$4;-><init>(Lrexsee/open/RexseeRenRenSNS;)V

    invoke-virtual {v0, v4}, Landroid/app/AlertDialog;->setOnKeyListener(Landroid/content/DialogInterface$OnKeyListener;)V

    .line 349
    new-instance v2, Landroid/widget/LinearLayout;

    iget-object v4, p0, Lrexsee/open/RexseeRenRenSNS;->mContext:Landroid/content/Context;

    invoke-direct {v2, v4}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    .line 350
    .local v2, "layout":Landroid/widget/LinearLayout;
    const/4 v4, 0x1

    invoke-virtual {v2, v4}, Landroid/widget/LinearLayout;->setOrientation(I)V

    .line 351
    invoke-virtual {v2, v6, v6, v6, v6}, Landroid/widget/LinearLayout;->setPadding(IIII)V

    .line 352
    new-instance v1, Landroid/widget/EditText;

    iget-object v4, p0, Lrexsee/open/RexseeRenRenSNS;->mContext:Landroid/content/Context;

    invoke-direct {v1, v4}, Landroid/widget/EditText;-><init>(Landroid/content/Context;)V

    .line 353
    .local v1, "editBox":Landroid/widget/EditText;
    new-instance v4, Landroid/widget/LinearLayout$LayoutParams;

    const/16 v5, 0xc8

    invoke-direct {v4, v7, v5}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v2, v1, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 354
    const/16 v4, 0x33

    invoke-virtual {v1, v4}, Landroid/widget/EditText;->setGravity(I)V

    .line 355
    invoke-virtual {v1, v8}, Landroid/widget/EditText;->setSingleLine(Z)V

    .line 356
    invoke-virtual {v1, p3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 357
    invoke-virtual {v1}, Landroid/widget/EditText;->requestFocus()Z

    .line 358
    invoke-virtual {v0, v2}, Landroid/app/AlertDialog;->setView(Landroid/view/View;)V

    .line 359
    new-instance v3, Lrexsee/open/RexseeRenRenSNS$5;

    invoke-direct {v3, p0, v1, p1, p2}, Lrexsee/open/RexseeRenRenSNS$5;-><init>(Lrexsee/open/RexseeRenRenSNS;Landroid/widget/EditText;Ljava/lang/String;Ljava/lang/String;)V

    .line 388
    .local v3, "listener":Landroid/content/DialogInterface$OnClickListener;
    sget-object v4, Lrexsee/core/lang/RexseeLanguage;->ACTION_SHARE:Ljava/lang/String;

    invoke-virtual {v0, v7, v4, v3}, Landroid/app/AlertDialog;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    .line 389
    const/4 v4, -0x2

    iget-object v5, p0, Lrexsee/open/RexseeRenRenSNS;->mContext:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const/high16 v6, 0x1040000

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v0, v4, v5, v3}, Landroid/app/AlertDialog;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    .line 390
    invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V

    .line 392
    return-void
.end method

.method public request(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .param p1, "arguments"    # Ljava/lang/String;
    .param p2, "progressTitle"    # Ljava/lang/String;

    .prologue
    .line 308
    iget-object v2, p0, Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    invoke-virtual {v2, p2}, Lrexsee/core/progress/RexseeProgressDialog;->show(Ljava/lang/String;)V

    .line 309
    invoke-static {p1}, Lrexsee/core/utilities/Utilities;->string2map(Ljava/lang/String;)Ljava/util/HashMap;

    move-result-object v0

    .line 310
    .local v0, "paramMap":Ljava/util/Map;, "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;"
    invoke-direct {p0, v0}, Lrexsee/open/RexseeRenRenSNS;->_post(Ljava/util/Map;)Ljava/lang/String;

    move-result-object v1

    .line 311
    .local v1, "rtn":Ljava/lang/String;
    iget-object v2, p0, Lrexsee/open/RexseeRenRenSNS;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v2, v2, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    invoke-virtual {v2}, Lrexsee/core/progress/RexseeProgressDialog;->hide()V

    .line 312
    return-object v1
.end method

.method public setDefaultTitleAndLink(Ljava/lang/String;Ljava/lang/String;)V
    .locals 0
    .param p1, "title"    # Ljava/lang/String;
    .param p2, "link"    # Ljava/lang/String;

    .prologue
    .line 325
    iput-object p1, p0, Lrexsee/open/RexseeRenRenSNS;->mDefaultTitle:Ljava/lang/String;

    .line 326
    iput-object p2, p0, Lrexsee/open/RexseeRenRenSNS;->mDefaultLink:Ljava/lang/String;

    .line 327
    return-void
.end method

.method public setKeyAndSecret(Ljava/lang/String;Ljava/lang/String;)V
    .locals 0
    .param p1, "key"    # Ljava/lang/String;
    .param p2, "secret"    # Ljava/lang/String;

    .prologue
    .line 231
    iput-object p1, p0, Lrexsee/open/RexseeRenRenSNS;->mKey:Ljava/lang/String;

    .line 232
    iput-object p2, p0, Lrexsee/open/RexseeRenRenSNS;->mSecret:Ljava/lang/String;

    .line 233
    return-void
.end method
